﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace ScoutOffice.BLL
{
    public class Scouter
    {
        private Guid _scouterId;
        private string _firstName;
        private string _middleName;
        private string _lastName;
        private string _suffixName;
        private Address _mailingAddress;
        private string _homePhone;
        private DateTime _dateOfBirth;
        private EthnicBackground _background;
        private Gender _gender;
        private List<Position> _currentPositions;

        public Guid ScouterId { get { return _scouterId; } set { _scouterId = value; } }
        public string FirstName { get { return _firstName; } set { _firstName = value; } }
        public string MiddleName { get { return _middleName; } set { _middleName = value; } }
        public string LastName { get { return _lastName; } set { _lastName = value; } }
        public string SuffixName { get { return _suffixName; } set { _suffixName = value; } }
        public ReadOnlyCollection<Position> CurrentPositions
        {
            get { return new ReadOnlyCollection<Position>(_currentPositions); }
        }

        public Scouter(string firstName, string lastName)
        {
            _scouterId = Guid.NewGuid();
            _firstName = firstName;
            _lastName = lastName;
            _currentPositions = new List<Position>();
        }

        public void BeginPosition(Position p)
        {
            _currentPositions.Add(p);
        }

        public void EndPosition(Position p)
        {
            _currentPositions.Remove(p);
        }
    }
}
